home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cursman / cursman.bas next >
BASIC Source File  |  1995-05-09  |  662b  |  27 lines

  1.  
  2. Sub Main ()
  3.  
  4. Dim A As Long
  5. Form1.Show
  6. C_State = -1
  7.  
  8.       'Never ending loop for the purpose of this demo
  9.  
  10. While A = A
  11.  
  12.       'Call the API function defined in CURSPOSG.BAS to retreive
  13.       '                                cursor position on screen.
  14.       Call GetCursorPos(Pos)
  15.       
  16.       'Write current cursor position
  17.       Form1.label1.caption = " Screen X: " + Str$(Pos.x) + " -  Y: " + Str$(Pos.Y)
  18.       
  19.       'Write position selected with mouse
  20.       Form1.label2.caption = " Pos = X: " + Str$(tPos.x) + " - Y: " + Str$(tPos.Y)
  21.       
  22.       'Execute other events (mouse click, buttons...)
  23.       A = DoEvents()
  24. Wend
  25. End Sub
  26.  
  27.